package com.lyk.read.book.bean

import android.os.Parcel
import android.os.Parcelable

/**
 * 图片上带有名字
 * Created by LianYongKe on 2024/3/15.
 */
data class DetailItemBean(
    var desc: String? = null,
    var img: String? = null,
): Parcelable {
    constructor(parcel: Parcel) : this(
        parcel.readString(),
        parcel.readString()
    ) {
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(desc)
        parcel.writeString(img)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<DetailItemBean> {
        override fun createFromParcel(parcel: Parcel): DetailItemBean {
            return DetailItemBean(parcel)
        }

        override fun newArray(size: Int): Array<DetailItemBean?> {
            return arrayOfNulls(size)
        }
    }

}